package com.jing.ads.handler;

import org.json.JSONObject;

import android.content.Context;

import com.jing.ads.application.MyApplication;
import com.jing.ads.model.Entry;

public class LogHandler extends BaseHandler {

	public static final String ACTION_DOWNLOAD = "1";
	public static final String ACTION_INSTALL = "2";
	public static final String ACTION_ACTIVE = "3";
	
	private String actionIndex = "";
	private String udid = "";
	private String package_name = "";
	
	public LogHandler(Context context) {
		super(context);
		MyApplication app = (MyApplication) context.getApplicationContext();
		udid = app.getUDID();
		this.action = "uplog";
	}

	public void setParams(String action, String package_name) {
		this.actionIndex = action;
		this.package_name = package_name;
	}
	
	@Override
	protected void initRequest() {
		this.params.put("package_name", package_name);
		this.params.put("udid", udid);
		this.params.put("action", actionIndex);
		this.params.put("version", String.valueOf(versionCode));
	}

	@Override
	protected void initEntity() {

	}

	@Override
	protected void onParser(JSONObject response) {

	}

	@Override
	public Entry getData() {
		return null;
	}

}
